Skip to content

Conversation

@Xelus22
Copy link

@Xelus22 Xelus22 commented Oct 2, 2025

Description

Fix initial template go version to the correct version.
When attempting to initialise a hello world, this error comes up.

xelus:~/sandbox$ wails init -t svelte-ts -n helloworld
Wails CLI v2.10.2


# Initialising Project 'helloworld'
go: downloading go1.23 (linux/amd64)
go: download go1.23 for linux/amd64: toolchain not available

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.

  • Windows
  • macOS
  • Linux

If you checked Linux, please specify the distro and version.
Ubuntu 22.04.5 LTS, WSL2

Test Configuration

xelus:~/wails$ wails doctor


          Wails Doctor



# Wails
Version         | v2.10.2
Package Manager | apt


# System
WARNING: failed to read int from file: open /sys/devices/system/cpu/cpu0/online: no such file or directory
┌────────────────────────────────────────────────────┐
| OS           | Ubuntu                              |
| Version      | 22.04                               |
| ID           | ubuntu                              |
| Branding     |                                     |
| Go Version   | go1.22.3                            |
| Platform     | linux                               |
| Architecture | amd64                               |
| CPU          | AMD Ryzen 9 5900X 12-Core Processor |
| Memory       | 16GB                                |
└────────────────────────────────────────────────────┘

# Dependencies
┌──────────────────────────────────────────────────────────────────────────┐
| Dependency | Package Name          | Status    | Version                 |
| *docker    | docker.io             | Available | 27.5.1-0ubuntu3~22.04.2 |
| gcc        | build-essential       | Installed | 12.9ubuntu3             |
| libgtk-3   | libgtk-3-dev          | Installed | 3.24.33-1ubuntu2.2      |
| libwebkit  | libwebkit2gtk-4.0-dev | Installed | 2.48.5-0ubuntu0.22.04.1 |
| npm        | npm                   | Installed | 10.8.2                  |
| *nsis      | nsis                  | Installed | v3.08-2                 |
| pkg-config | pkg-config            | Installed | 0.29.2-1ubuntu3         |
|                                                                          |
└──────────────────────── * - Optional Dependency ─────────────────────────┘

# Diagnosis
Optional package(s) installation details:
  - docker: sudo apt install docker.io

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Bug Fixes

    • Standardized starter templates to require Go 1.23.0 across all variants (plain, lit, preact, react, svelte, vanilla, vue, and TypeScript flavors). No dependency or API changes.
  • Documentation

    • Updated the changelog to record alignment of starter templates with Go 1.23.0.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 2, 2025

Walkthrough

Bumps Go version directives in multiple go.mod.tmpl files to 1.23.0 (from variants like 1.18 and 1.23) across base, generate, and framework-specific templates, and updates the website changelog to record the correction. No other behavioral or API changes.

Changes

Cohort / File(s) Summary of changes
Base & Generate templates
v2/pkg/templates/base/go.mod.tmpl, v2/pkg/templates/generate/plain/go.mod.tmpl
Updated go directive from 1.18 to 1.23.0. No other edits.
Framework templates (all flavors)
v2/pkg/templates/templates/.../go.mod.tmpl
Examples: lit/go.mod.tmpl, lit-ts/go.mod.tmpl, plain/go.mod.tmpl, preact/go.mod.tmpl, preact-ts/go.mod.tmpl, react/go.mod.tmpl, react-ts/go.mod.tmpl, svelte/go.mod.tmpl, svelte-ts/go.mod.tmpl, vanilla/go.mod.tmpl, vanilla-ts/go.mod.tmpl, vue/go.mod.tmpl, vue-ts/go.mod.tmpl
Normalized go directive variants to 1.23.0 (previously 1.23, etc.). No changes to require/replace lines or other template content.
Changelog
website/src/pages/changelog.mdx
Added an Unreleased/Fixed entry noting initialization templates now use the correct Go version.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Potential attention areas:

  • v2/pkg/templates/base/go.mod.tmpl and v2/pkg/templates/generate/plain/go.mod.tmpl (major version bump from 1.18).
  • website/src/pages/changelog.mdx for copy/placement consistency.

Suggested labels

size:L, lgtm

Poem

Thump-thump, I hop and tweak the line,
From older burrows to 1.23.0 fine.
Templates neat, each module bright,
Changelog nods in morning light.
A tiny hop — all set, goodnight. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: updating Go version in templates from 1.23 to 1.23.0 to fix initialization issues.
Description check ✅ Passed The description includes a clear problem statement with error reproduction, identifies it as a bug fix, provides test environment details, and updates the changelog as required.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4cc004 and 3db4361.

📒 Files selected for processing (1)
  • website/src/pages/changelog.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-04-26T02:15:24.843Z
Learnt from: Taiterbase
Repo: wailsapp/wails PR: 4241
File: v2/examples/privatewindow/frontend/src/main.js:7-15
Timestamp: 2025-04-26T02:15:24.843Z
Learning: The `wails init` command generates template code that includes an unmatched closing div tag in the HTML structure.

Applied to files:

  • website/src/pages/changelog.mdx
📚 Learning: 2025-08-08T13:15:20.339Z
Learnt from: APshenkin
Repo: wailsapp/wails PR: 4484
File: v2/internal/frontend/utils/urlValidator.go:25-31
Timestamp: 2025-08-08T13:15:20.339Z
Learning: In Wails v2 (PR wailsapp/wails#4484), for BrowserOpenURL URL validation (v2/internal/frontend/utils/urlValidator.go), maintainers (APshenkin) prefer not to restrict schemes to an http/https allowlist because supported schemes may vary. The allowlist suggestion is declined; continue with the existing denylist approach and generic validation.

Applied to files:

  • website/src/pages/changelog.mdx
🔇 Additional comments (1)
website/src/pages/changelog.mdx (1)

29-29: Changelog entry is well‑formatted and accurate.

The entry correctly documents the Go version template fix with proper Markdown link syntax and consistent formatting aligned with other entries in the "Fixed" section. The link is correctly formatted without extra spaces, and the attribution is clear.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Xelus22 Xelus22 marked this pull request as ready for review October 2, 2025 08:22
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (6)
v2/pkg/templates/templates/lit-ts/go.mod.tmpl (1)

3-3: Same verification needed as other templates.

Same version update concern applies here. See verification request in vue-ts/go.mod.tmpl.

v2/pkg/templates/templates/vanilla/go.mod.tmpl (1)

3-3: Same verification needed.

Duplicate of version verification concern. See vue-ts/go.mod.tmpl comment.

v2/pkg/templates/templates/preact-ts/go.mod.tmpl (1)

3-3: Same verification needed.

Duplicate of version verification concern. See vue-ts/go.mod.tmpl comment.

v2/pkg/templates/templates/lit/go.mod.tmpl (1)

3-3: Same verification needed.

Duplicate of version verification concern. See vue-ts/go.mod.tmpl comment.

v2/pkg/templates/templates/react/go.mod.tmpl (1)

3-3: Same verification needed.

Duplicate of version verification concern. See vue-ts/go.mod.tmpl comment.

v2/pkg/templates/templates/plain/go.mod.tmpl (1)

3-3: Same verification needed.

Duplicate of version verification concern. See vue-ts/go.mod.tmpl comment.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db22cb2 and 812b0e7.

📒 Files selected for processing (16)
  • v2/pkg/templates/base/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/generate/plain/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/lit-ts/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/lit/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/plain/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/preact-ts/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/preact/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/react-ts/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/react/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/svelte-ts/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/svelte/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/vanilla-ts/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/vanilla/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/vue-ts/go.mod.tmpl (1 hunks)
  • v2/pkg/templates/templates/vue/go.mod.tmpl (1 hunks)
  • website/src/pages/changelog.mdx (1 hunks)
🔇 Additional comments (4)
v2/pkg/templates/templates/vue-ts/go.mod.tmpl (1)

3-3: Go 1.23.0 is officially released
Go 1.23.0 was released on August 13, 2024; the latest patch in the 1.23 series is 1.23.12 (Aug 6, 2025).

v2/pkg/templates/templates/preact/go.mod.tmpl (1)

3-3: LGTM! Correct Go version format.

The change from go 1.23 to go 1.23.0 uses the proper three-part semantic version format, fixing the toolchain download error reported in the PR.

v2/pkg/templates/templates/react-ts/go.mod.tmpl (1)

3-3: LGTM! Consistent fix across templates.

The Go version update to 1.23.0 is correctly applied, matching the fix in other templates.

v2/pkg/templates/generate/plain/go.mod.tmpl (1)

3-3: LGTM! Version modernization and fix.

The update from go 1.18 to go 1.23.0 not only fixes the version format issue but also modernizes this template to align with the other templates in the codebase.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 8, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants